class PrintChar{

  constructor(str, number) {
    this.str = str;
    this.number = number;

  }

  for1() {
    let temp = 1;
    for (var i = 0; i < this.number; i++) {
      let result = "";
      for (var j = 0; j < temp; j++) {
        result += this.str;
      }
      temp += 1;
      console.log(result);
    }
  }

  for2() {
    let temp = 0;
    for (var i = 0; i < this.number; i++) {
      let result = "";
      for (var j = temp;j < this.number; j++) {
        result += this.str;
      }
      temp += 1;
      console.log(result);
    }
  }


}
var p = new PrintChar("A", 10);
p.for1();
console.log("==============================");
p.for2();
